// pages/mine/merchants/merchants.js
const service = require('../mineService.js')

Page({

  /**
   * 页面的初始数据
   */
  data: {
      name:"",
      phone: "",
      wxAcount: "",
      serve: ""
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
  },
  nameInPut: function(e){
    this.setData({
      name: e.detail.value
    })
  },
  phoneInPut: function (e) {
    this.setData({
      phone: e.detail.value
    })
  },

  wxAcountInPut: function (e) {
    this.setData({
      wxAcount: e.detail.value
    })
  },

  serveInPut: function (e) {
    this.setData({
      serve: e.detail.value
    })
  },

  submit: function(){
    console.log(this.data)
    service.saveSupplier(this.data, function (res) {
      console.log(res)
    });
  }

})